<h1>Evaluar Charla</h1>	

<div class="alert alert-info">
	<table>
		<tr>
			<td>
				<img src=<%= @charla.conferencia.cargarImagen() %> class="img-thumbnail" style="border-radius: 5%; height:100px;">
			</td>
			<td>
				<div>
					<div>
						<h2><%= @charla.titulo%> <small><%= @charla.conferencia.nombre%></small></h2>
					</div>  
					<div>
						<p><%= @charla.abstract%></p>
					</div> 
				</div>
			</td>
		</tr>
	</table>
</div>
	
<% if @message != nil %>
	<p class="alert alert-danger text-danger"><%= @message %></p>
<% end %>

<form method="post" action="/evaluarCharla/<%= @charla.id %>" role="form">
	<textarea name="resumen" rows="7" cols="77" placeholder="Resumen"><%= params[:resumen] %></textarea>
	<br><br>

	<textarea name="comentario" rows="7" cols="77" placeholder="Comentario"><%= params[:comentario] %></textarea>
			
	<br><br>
	
	<div class="form-group">
		<label for="radioEval">Evaluación:</label><br/>
		<label class="checkbox-inline">
			<input type="radio" class="form-control" name="radioEval" value="1" checked="true"><span class="glyphicon glyphicon-thumbs-up"/>Aprobar
		</label>
		<label class="checkbox-inline">
			<input type="radio" class="form-control" name="radioEval" value="2"><span class="glyphicon glyphicon-thumbs-down"/>Desaprobar
		</label>
	</div>
	
	<br/>
	<input type="submit" value="Enviar" class="btn btn-primary" />

    <input type="submit" value="Volver" onClick="volver(this, <%= @charla.conferencia_id %>)" class="btn btn-default"/>
</form>
<script type="text/javascript">
	function volver(button, idConferencia) {
	  button.form.method = 'get'
	  button.form.action = '/verCharlas/' + idConferencia
	  return true
	}
</script>